home *** CD-ROM | disk | FTP | other *** search
- Path: macqbl.com.au!usenet
- From: drubie@macquarie.com.au (David Rubie)
- Newsgroups: comp.lang.c++
- Subject: Re: Obtaining IP Address
- Date: 14 Mar 1996 01:18:35 GMT
- Organization: Macquarie Bank Ltd.
- Message-ID: <4i7s5b$mp6@mblisd.macqbl.com.au>
- References: <314665EC.4AF7@ebicom.net>
- Reply-To: drubie@macquarie.com.au
- NNTP-Posting-Host: isd47.macqbl.com.au
-
- In article <314665EC.4AF7@ebicom.net>, trahan <trahan@ebicom.net> writes:
- >That's using windows operating system. It is really proving to be a big
- >pain in the rear if you know what I mean.
- >
- >We can not determine how to get our own IP address even though we know
- >its available to the operating system. Any info you might be able to
- >pass our way would be helpful.
-
- The most portable way to do it is via the WINSOCK stuff. Get a book
- about programming sockets under windows. The WINSOCK interface provides
- a standard, portable way of retrieving both the hostname of the machine
- (gethostname()) and the other details (like the IP address) via
- gethostbyname().
-
- WINSOCK might also be able to retrieve the IP address directly, but
- I don't have the documentation handy.
-
- dave.
-
- --
- -------------------------------------------------------
- David Rubie
- Macquarie Bank Ltd.
- drubie@macqbl.com.au
-
-
-